package com.gepengjun.lims.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.gepengjun.lims.entity.User;
import com.baomidou.mybatisplus.service.IService;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jun
 * @since 2018-08-19
 */
public interface UserService extends IService<User> {

    List<User> findByUsernameAndPassword(String username, String passwordMd5);

    Boolean updPassword(Long userId, String username, String password);

    Page<User> findUserPage(Page<User> page,User user);

    Boolean judgeUsernameAvailable(String username);

    Boolean addUser(User user,String roleIds);

    Boolean disableUser(User user);

    Boolean ableUser(User user);

    Boolean updUser(User user,String roleIds);

    Map<String,Object> readFile(String filePath, String fileName) throws IOException;

    Map<String,String> validateUserAddList(List<User> userList);

    Boolean batchDisableUsers(List<Long> userIdList);

    Boolean batchAbleUsers(List<Long> userIdList);
}
